﻿<script>
//选择样式
function click_style(id){
$('#style'+id).prop("checked","checked").siblings().removeAttr("checked");
$('#setstyle').val(id);
sel_style(id);
return false;
}
function sel_style(id){
	for (var i=1;i<=7;i++) {
		if (i==id){
		$('#img'+id).css("border","1px solid red");
		}else{
		$('#img'+i).css("border","1px solid #ddd");
		}
	}
}
//预览

$(document).ready(function(){
    $("#preview").click(function(){
	time = $('#time').val();
	time = 99999;
	bgcolor = escape($('#bgcolor').val());
	style = $('#setstyle').val();
	$("#preview_frame").attr("src","?a={a}&t=view&settime="+time+"&setcolor="+bgcolor+"&setstyle="+style);
    });
});
</script>

<div class="col-md-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
  <h2><lang>网站风格选择</lang> <small><lang>下载远程的风格切换前端样式</lang></small></h2>
  <div class="clearfix"></div>
</div>
<div class="x_content">
<br>
<form class="form-horizontal form-label-left input_mask" method="POST" action="{post_url}">
<input name="setstyle" id="setstyle" value="{style}" class="hide">


<div class="form-group">
<label class="control-label col-md-2 col-sm-2 col-xs-12"><lang>跳转时间(毫秒)</lang></label>
<div class="col-md-9 col-sm-9 col-xs-12">
<input type="text" name="time" id="time" class="form-control " value="{time}">
</div>
</div>
<div class="form-group">
	<label class="control-label col-md-2 col-sm-2 col-xs-12"><lang>背景颜色</lang></label>
	<div class="col-md-9 col-sm-9 col-xs-12">
		<div class="input-group ColorPicker">
			<input type="text" name="bgcolor" id="bgcolor" value="{bgcolor}" class="form-control" />
			<span class="input-group-addon"><i></i></span>
		</div>
	</div>
</div>



	<div class="ln_solid"></div>
	<div class="form-group">
	<div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-3"><button type="submit" class="btn btn-success"><lang>保存</lang></button> <button type="button" class="btn btn-primary" id="preview"><lang>预览</lang></button></div>
	</div>

  </form>
</div>
</div>

</div>



<div class="col-md-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
  <h2><lang>预览效果</lang></h2>
  <div class="clearfix"></div>
</div>
<div class="x_content" style="height:500px;">
{run:echo msg_go()}
<iframe name="preview_frame" id="preview_frame" width="100%" height="100%" src="" border="0" frameborder="0"></iframe>
 
</div>
</div>
</div>


<script>sel_style({style});</script>
